<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>click and onchange</title>
</head>
<body>
    

    <div id="app">
        这是click没有点击的时候的样子
    </div>

    <input type="radio" id="singleSelect">

    <script>
    
        let app = document.getElementById("app");
        let singleSelect = document.getElementById("singleSelect");

        app.onclick = ()=>{
            console.log(this);
            alert(app.innerHTML);
            app.innerHTML = '已经点击过了，内容改变了';
        }

        singleSelect.onchange = ()=>{
            alert(singleSelect.checked);
            singleSelect.checked = true;
        }


    </script>

</body>
</html>